
import { Node, SpriteFrame, sys } from 'cc'
import { EventManager } from "./EventManager";
interface Imaterials {
    [id: string]: SpriteFrame | null
}
export class DataManager {
    private static instance: DataManager = null;
    static get Instance() {
        return this.instance ? this.instance : (this.instance = new DataManager(), this.instance);
    }
    /**副本id */
    private _duplicateID: string = null;
    /**关卡id */
    private _threadID: string = null;
    private _openid: string = '';
    /**头像链接 */
    head_portrait: string = null;
    create_time:string='';
    compound_id: string = null;
    compound_name: string = null;
    compound_img: string = null;
    address_id: string = null;
    node_ids: string = '';
    nodeLens:number=0;
    bagList: [] = [];
    /**最高等级 */
    level: number = 0;
    /**用户名 */
    name: string = null;
    token: string = null;
    game_user_id: string = null;
    user_id: string = null;
    clearance_ids: string = null;
    /**通关等级数组 */
    LevelArr: Object[] = [];
    /**当前等级 */
    curLevel: number = 0;
    xhr: XMLHttpRequest = null;
    /**材质数据 */
    materials: Imaterials = {};
    /**材质索引 */
    materialsId: string[] = [];
    propArr: [number,number][] = [];
    curProp:number=0;
    get duplicateID() {
        return this._duplicateID
    }
    set duplicateID(data: string) {
        this._duplicateID = data;
    }
    get threadID() {
        return this._threadID
    }
    set threadID(data: string) {
        this._threadID = data;
    }
    get openid() {
        return this._openid
    }
    set openid(data: string) {
        this._openid = data;
    }
}

